﻿import unittest
from selenium import webdriver
from Tests._tcBase import _tcBase
from Framework.PageClasses.CpAddNewAuction import CpAddNewAuction
from Framework.PageClasses.CpAuction import CpAuction
from Framework.PageClasses.CpLogin import CpLogin
from Framework.PageClasses.CpDefault import CpDefault
from Framework.DataClasses.CUser import *

class AddAuction( unittest.TestCase, _tcBase ):
    """Тест кейс добавления нового аукциона"""
    def setUp(self):
        _tcBase.setUp(self) 
            
    def tearDown(self):
        _tcBase.tearDown(self)

    def test_AddAuction(self):
        pageLogin = CpLogin(self.driver)
        pageLogin.open(self.driver, pageLogin.url)
        pageLogin.loginAs( user1 )

        pageAuction = CpAuction(self.driver)
        pageAuction.New()

        pageDefault = CpDefault(self.driver)
        pageDefault.LogOut()
        
if __name__ == '__main__':
    unittest.main()